<?php
declare (strict_types = 1);

namespace app\admin\validate;

use think\Validate;

class CheckLogin extends Validate
{
    /**
     * 定义验证规则
     * 格式：'字段名' =>  ['规则1','规则2'...]
     *
     * @var array
     */
    protected $rule = [
        'username'=>'require|max:22',
        'password'=>'require|max:22'
    ];

    /**
     * 定义错误信息
     * 格式：'字段名.规则名' =>  '错误信息'
     *
     * @var array
     */
    protected $message = [
        'username.require'  =>'用户名必须输入',
        'username.max'      =>'用户名长度超出22个字符',
        'password.require'  =>'密码必须输入',
        'password.max'  =>'密码长度超出22个字符'
    ];

}
